home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Software Vault: The Gold Collection
/
Software Vault - The Gold Collection (American Databankers) (1993).ISO
/
cdr28
/
doc_proc.zip
/
SAMP-DOC.ZIP
/
PASCAL.DOC
< prev
next >
Wrap
Text File
|
1992-11-16
|
30KB
|
374 lines
********************************************
* *
* *
* A STUDENT APPROACH TO *
* Pascal ON AN IBM MVS/XA OPERATING SYSTEM *
* *
* *
********************************************
John S. Ward
03/21/93
EJECT
In this handout we follow step-by-step instructions in creating
a Pascal program. Job Control Language (JCL) is used to demonstrate
file linkage as well as program execution. For the purpose of this
handout, we assume you have successfully accessed the ISPF/PDF
PRIMARY OPTION MENU shown below:
GEORGIA STATE UNIVERSITY COMPUTER CENTER
--------------------ISPF/PDF PRIMARY OPTION MENU-----------------------
OPTION ===>
USER ID -userid
0 ISPF PARAMS -Specify terminal and user parameters TIME -14:42
1 BROWSE -Display source data or output listing TERMINAL -3278
2 EDIT -Create or change source data PF KEYS -24
3 UTILITIES -Perform utility functions
4 FOREGROUND -Invoke language procedures in foreground
5 BATCH -Submit job for language processing
6 COMMAND -Enter TSO command or CLIST
7 DIALOG TEST -Perform dialog testing
8 LM UTILITIES-Perform library management utility functions
C CHANGE -Display summary of changes for this release
T TUTORIAL -Display information about ISPF/PDF
X EXIT -Terminate ISPF using log and list defaults
Enter END command or PF3 to terminate ISPF.
SECTION ONE: Creating your Pascal program.
1.1) Enter 6 at the "OPTION ===>" prompt of the ISPF/PDF PRIMARY OPTION
MENU, and hit return to go to TSO COMMAND PROCESSOR panel.
1.2) Type CREATE at the cursor, and hit return. Next, type your initials
when you are asked to "ENTER LIBRARY/APPLICATION NAME ===>". Hit
return, and type CNTL at the next prompt. Press return one more
time when you see three asterisks displayed (press return anytime
you see *** displayed).
1.3) Use the F4 key to go back to the primary menu. Then, enter 2 at
the "OPTION ===>" prompt to go to the EDIT - ENTRY PANEL.
Fill the sections of this panel as shown below:
EJECT
------------------------- EDIT - ENTRY PANEL ---------------------------
COMMAND ===>
ISPF LIBRARY:
PROJECT ===> your userid
GROUP ===> your initials ===> ===> ===>
TYPE ===> CNTL
MEMBER ===> program name (Blank for member selection list)
OTHER PARTITIONED OR SEQUENTIAL DATA SET:
DATA SET NAME ===>
VOLUME SERIAL ===> (If not catalogued)
DATA SET PASSWORD ===> (If password protected)
PROFILE NAME ===> (Blank defaults to data set type)
Hit return and you will see an empty file as shown below:
EDIT --- User-id.Initial.CNTL(member) ------------- COLUMNS 001 072
COMMAND ===> SCROLL ===>PAGE
****** *********************** TOP OF DATA **************************
''''''
''''''
''''''
''''''
''''''
''''''
.
.
Use the TAB key to move the cursor to any of the first six
asterisks of the first line. Next, type over one of those
asterisks with an "I" (for insert), and hit return. You can now
enter your program. New lines are generated every time you type a
line and press return. When you are finished entering your program,
press return. The absence of data followed by a return will stop
new lines from being generated. You may prefer to use the example
below for practice purposes:
EJECT
EDIT --- user-id.init.CNTL(PAS) ------------------------------ COLUMNS 001 07
COMMAND ===> SCROLL ===> PAG
****** ************************* TO OF DATA *********************************
000100 //STEP1 EXEC PASCCLG
000200 PROGRAM TEST(INPFILE,OUTFILE);
000300 TYPE
000400 LINES = PACKED ARRAY (.1..80.) OF CHAR;
000500 VAR
000600 INPFILE,OUTFILE : FILE OF LINES;
000700 BEGIN
000800 RESET(INPFILE);
000900 REWRITE(OUTFILE);
001000 WHILE NOT EOF(INPFILE) DO
001100 BEGIN
001200 OUTFILE@ := INPFILE@;
001300 PUT(OUTFILE);
001400 GET(INPFILE)
001500 END
001600 END.
001700 //GO.INPFILE DD DSN=user-id.init.CNTL(input member),DISP=SHR
001800 //GO.OUTFILE DD DSN=user-id.init.CNTL(output member),DISP=OLD
****** ************************* BOTTOM OF DATA *****************************
EJECT
The program above reads a character record of length eighty from
an input file and writes it back to an output file. In this
program, the lines starting with "//" in columns one and two are
JCL statements. The first statement compiles, links and executes
the program. The JCL statements that start with "//GO." link your
input and output files to the program. Note that for the input
and output files, the clauses DISP=SHR, and DISP=OLD are used.
This means that these files must already exist before the program
can successfully execute.
SECTION TWO: Creating input/output files:
To create the input file, go back to the EDIT - ENTRY PANEL
by typing "=2" at the "COMMAND ===>" prompt of the current panel
and pressing return. Once you leave the current screen, your
program is automatically saved. In the EDIT panel, enter the name
of your input file at the "MEMBER ===>" prompt and hit return.
Enter your input data the same way you entered your program.
Unlike the input member that must be created ahead of time,
the member for the output data is created when the program is
executed. However the data set that houses the output member must
already exist before the program is executed. You have already
constructed this data set when you used the CREATE command.
SECTION THREE: Executing your Pascal program.
3.1) To execute your program, enter =2 at the "COMMAND ===>" prompt.
Press return to go to the EDIT - ENTRY PANEL.
3.2) Enter the name of your Pascal program at the "MEMBER ===>"
prompt. Press return and your program will be displayed at
the terminal.
3.3) Enter the command "SUBT A,10" at the "COMMAND ===>" prompt of
this panel and press return to submit your program to the system.
The operating system assign a jobname comprised of your userid
suffixed with the letter A followed by a job number. The response
from the operating system will resemble the lines below:
IKJ56250I JOB useridA(JOBnumber) SUBMITTED
***
Memorize the number inside the parentheses.
EJECT
SECTION FOUR : Accessing your output:
4.1) At the "COMMAND ===>" prompt, type =3.8 to go to OUTLIST UTILITY
PANEL.
-------------------- OUTLIST UTILITY ----------------------------------
OPTION ===>
L - List job name/id's via the TSO STATUS command
D - Delete job output from SYSOUT hold queue
P - Print job output and delete from SYSOUT hold queue
R - Requeue job output to a new output class
blank - Display job output
FOR JOB TO BE SELECTED:
JOBNAME ===> Userid
CLASS ===>
JOBID ===> J01977
FOR JOB TO BE REQUEUED:
NEW OUTPUT CLASS ===>
* DESTINATION ===>
FOR JOB TO BE PRINTED: (A for ANSI)
PRINTER CARRIAGE CONTROL ===> (M for machine)
(blank for none)
* - Georgia State University Enhancement
Press return to see your output.
4.2) Use the TAB key to tab to the "JOBNAME ===>" prompt. Here, type
your userid, followed by the letter "A" (or the jobname suffix
entered earlier).
EJECT
4.3) Next, tab down to the "JOBID ===>" prompt, and type the letter "J
followed by the job number you memorized earlier. Then, hit
return to see your job output. To scroll down, use the F8 key,
and to scroll up, use the F7 key. To scroll left and right,
use the F10, and F11 keys respectively.
Below is a similar facsimile of a successful Pascal execution a
viewed from the OUTLIST UTILITY menu.
BROWSE - USGHND.DAY.SPF235.OUTLIST ------------ LINE 000000 COL 001 080
COMMAND ===> SCROLL ===>HALF
********************************** TOP OF DATA ************************
1 J E S 2 J O B L O G -- S Y S T E M G S U 1 -- N O
0
11.12.36 JOB 2185 ICH70001I USGHND LAST ACCESS AT 11:09:25 ON TUESDAY, OC
11.12.36 JOB 2185 $HASP373 USGHNDX STARTED - INIT A - CLASS A - SYS GSU1
11.12.45 JOB 2185 - --TIMING
11.12.45 JOB 2185 -JOBNAME STEPNAME PROCSTEP RC EXCP CONN CPU
11.12.45 JOB 2185 -USGHNDX PASC 00 332 1851 .0
0
11.12.45 JOB 2185 -USGHNDX LKED 00 332 1851 .00
11.12.45 JOB 2185 -USGHNDX GO 00 332 1851 .00
11.12.45 JOB 2185 -USGHNDX ENDED. NAME-USGHND /\ TOTAL CPU TIME=
11.12.46 JOB 2185 $HASP395 USGHNDX ENDED ||
0------ JES2 JOB STATISTICS ------ ||
- 18 OCT 88 JOB EXECUTION DATE ||-------------------
- 9 CARDS READ | A RETURN CODE (RC)
- 152 SYSOUT PRINT RECORDS | OF ZERO MEANS YOUR
- 0 SYSOUT PUNCH RECORDS | PROGRAM EXECUTED
- 8 SYSOUT SPOOL KBYTES | WITHOUT ERRORS.
- 0.17 MINUTES EXECUTION TIME |
1 //USGHNDX JOB I994998,USGHND, |--------------------
// NOTIFY=USGHND,CLASS=A,MSGLEVEL=(1,1),
// USER=USGHND,TIME=(0,5)
4.4) To look at your output file, type =2 at the "COMMAND ===>" prompt
When you are in the EDIT - ENTRY PANEL, type the name of your
output file (OUTDATA in our case) in the "TYPE ===>" prompt.
Then, hit return to see your output file.
SECTION FIVE: Logging off.
To logoff, enter =X at the "COMMAND ===>" or "OPTION ===>"
prompt of any panel. Once the operating system displays the
message READY, you may then type the command LOGOFF.
At this point you will be disconnected from the system.
IMPORTANT NOTE:
The program, input and output files that you have created are
saved in the system. Therefore subsequent executions should
reference sections 3.1 through 4.4.
EJECT
COMMONLY USED FEATURES OF THE FILE EDITOR
ISPF/PDF
PROGRAM
FUNCTION KEYS NOTE: The more frequently used keys have
been marked with an asterisk
F1 HELP
F2 SPLIT SCREEN
* F3 END
F4 RETURN
F5 RFIND
F6 RCHANGE
* F7 UP SCREEN
* F8 DOWN SCREEN
F9 SWAP
* F10 LEFT SCREEN
* F11 RIGHT SCREEN
F12 CURSOR
------------------------------------------------------------------------
ISPF/PDF
MENUS
* =2 EDIT
=3.1 DELETE MEMBERS
=3.2 DELETE DATA SETS
=3.4 GET LISTING OF ALL DATA SETS
=3.6 GET PROGRAMS OF DATA FILES SENT TO PRINTER
* =3.8 DISPLAY OR PRINT JOB OUTPUT
* =X EXIT OR LOGOFF SYSTEM (then type: logoff)
------------------------------------------------------------------------
KEYBOARD NOTES
***** WHENEVER PROMPTED WITH '***' PRESS RETURN *****
***** IF PROMPTED WITH "READY" TO GET BACK ON THE *****
***** SYSTEM TYPE "ICF", OR IF YOU ARE FINISHED *****
***** TYPE "LOGOFF". *****
***** IF KEYBOARD FREEZES, PRESS THE TAB KEY *****
***** IF STILL FROZEN, PRESS THE return key *****
***** IF STILL FROZEN, PRESS CNTL G *****
***** IF KEYBOARD IS STILL LOCKED UP, PRESS ALT 2 *****
***** IF KEYBOARD IS STILL LOCKED UP, PRESS ALT 1 *****
------------------------------------------------------------------------